<?php
namespace app\controller\home;

use think\facade\Db;
use app\BaseController;
    class Index extends BaseController
    {
        public function index(){
            // echo("首页暂时没有需要请求的地方");
            $swipes = Db::name('home_swipe')
            ->select();
            $maps = Db::name('home_map')
            ->where('id',1)
            ->select();
            $meals = Db::name('meals')
            ->where('meal_type_id',1)
            ->select()->toArray();
            foreach($meals as $key=>$value){
                $meals[$key]['img'] = explode(",,",$value['img']);
             }
            
            return BaseController::returnSuccessMsg('10001',['swipe'=>$swipes,'map'=>$maps,'meal'=>$meals]);
        }

    }

?>


